<template>
	<view>
		<!-- <button open-type="contact" session-from="test1" >客服1</button> -->
		<button open-type="contact" session-from="test2" @contact="contactHandler">客服2</button>
		<!-- <button open-type="contact" session-from="test3" @contact="contact2Handler">客服3</button> -->
	</view>
</template>

<script>
	export default {
		data() {
			return {

			};
		},
		methods: {
			contactHandler(value) {
				console.log('contactHandler', value, value.detail.path)
				if (value.detail.path.indexOf('xmly_ljj30') != -1) {
					uni.navigateTo({
						url: '/pages/xmly_ljj30/xmly_ljj30?a=123aaa'
					})
				}

			},
			contact2Handler(value) {
				uni.navigateToMiniProgram({
					appId: 'wxc669e83003dfb7a0',
					path: '/pages/my/my',
					extraData: {
						'data1': 'test'
					},
					success(res) {
						// 打开成功
						console.log('contact2Handler res', res)
					},
					fail(err) {
						console.log('contact2Handler err', err)
					}
				})
			}
		}
	}
</script>

<style lang="scss">

</style>